package com.zy.test.rabbitmq.consumer;

import cn.hutool.core.lang.Console;
import org.springframework.amqp.rabbit.annotation.Queue;
import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

/**
 * rabbitmq 消费者
 *
 * @Author jhr
 * @Date 2023/6/1
 */
@Component
public class Consumer {
    @RabbitHandler
    @RabbitListener(queuesToDeclare = @Queue("rabbitmq_queue"))
    public void process(String msg) {
        Console.log("消费者信息"+ msg);
    }
}
